/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilities;

import org.lwjgl.Sys;

/**
 *
 * @author ctuchsch
 */
public class Timing
{

    private static long lastFrame = Sys.getTime();

    private static long getTime()
    {
        return (Sys.getTime() * 1000) / Sys.getTimerResolution();
    }

    public static int getDelta()
    {
        long currentTime = getTime();
        int delta = (int) (currentTime - lastFrame);
        lastFrame = getTime();
        return delta;
    }
}
